﻿@{
    ViewBag.Title = "Team";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<h2>Team information</h2>
<table class="table table-bordered table-hover text-center" id="table1">
    <thead>
        <tr>
            <td>成员名称</td>
            <td>成员职责</td>
            <td>参与项目</td>
        </tr>
    </thead>
    <tbody></tbody>
</table>
<script>
    $(document).ready(function () {
        Team_Show();
    })
    
    function Team_Show() {
        $.ajax({
            type: "get",
            url: "/Home/Team_Show",
            success: function (d) {
                $(d).each(function (i, item) {
                    var tr = "<tr><td>" + item.Name + "</td><td>" + item.MemberTyep + "</td><td>" + item.ProjectName + "</td></tr>";
                    $("#table1 tbody").append(tr);
                })
            }
        })
    }
</script>
